import request from '@/router/axios';

// 员工、客户检索
export function retrieve(query) {
    return request({
        url: '/cp/workmessage/fromusers',
        method: 'get',
        params: query
    });
}
// 客户检索
export function fromusers_con(query) {
    return request({
        url: '/cp/workmessage/fromusers-con',
        method: 'get',
        params: query
    });
}
// 员工检索
export function retrieve_emp(query) {
    return request({
        url: '/cp/workmessage/fromusers-emp',
        method: 'get',
        params: query
    });
}
//会话存档 聊天记录查看
export function chatRecords(query) {
    return request({
        url: '/cp/workmessage/page',
        method: 'get',
        params: query
    });
}
//会话对象列表(员工)
export function chatEmployeeObject(query) {
    return request({
        url: '/cp/workmessage/to-users',
        method: 'get',
        params: query
    });
}
//会话对象列表(客户)
export function chatCustomerObject(query) {
    return request({
        url: '/cp/workmessage/to-contact',
        method: 'get',
        params: query
    });
}
//会话存档 全局检索
export function globalRetrieve(query) {
    return request({
        url: '/cp/workmessage/index',
        method: 'get',
        params: query
    });
}
//导出excel列表
export function exportExcel(obj) {
    return request({
        url: '/cp/workmessage/excel',
        method: 'post',
        data: obj,
        responseType: 'blob'
    });
}
